import 'package:word_game/engine/core.dart';
import 'package:word_game/rpg_hero.dart';

class ViewEquipmentEvent extends Eventable {
  ViewEquipmentEvent() : super('装备(e)') {
    this.code = 'e';
  }
  
  @override
  void doEvent(owner) {
    var rpgHero = World.instance.hero as RPGHero;
    var overlay = Focus();
    overlay.point = rpgHero.equipmentView;
    Focus.instance.overlays.add(overlay);
    World.instance.add(CloseEvent());
  }
}